package org.sith.gl.taskmanager.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import org.sith.gl.taskmanager.client.beans.TaskEntityGWT;
import org.sith.gl.taskmanager.client.beans.UserEntityGWT;


@RemoteServiceRelativePath("TasksRemoteService")
public interface TasksRemoteService extends RemoteService {
    UserEntityGWT getTasksForCurrentUser();

    void saveOrUpdateTask(TaskEntityGWT taskEntityGWT);

    

    /**
     * Utility/Convenience class.
     * Use TasksRemoteService.App.getInstance() to access static instance of TasksRemoteServiceAsync
     */
    public static class App {
        private static final TasksRemoteServiceAsync ourInstance = (TasksRemoteServiceAsync) GWT.create(TasksRemoteService.class);

        public static TasksRemoteServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
